define(["jquery","template","bch/template/commSearch/commSearch.tpl"],function($,template,tpl){
	var ui = {};

	var drawAddress = function(data){
		return template("tpl_commSearch_address",data);
	}
	var drawHealthy = function(data){
		return template("tpl_commSearch_healthy",data);
	}
	var drawCreatAuthor = function(data){
		return template("tpl_commSearch_creatAuthor",data);
	}
	var drawTaskName = function(data){
		return template("tpl_commSearch_taskName",data);
	}

	/**
	 * 社区 下拉
	 */
	ui.address = function(options){
		$("#"+options.id).html(tpl.address());
		var h = drawAddress(options);
		$("#"+options.id).html(h);
	}
	/**
	 * 健康情况 下拉
	 */
	ui.healthy = function(options){
		$("#"+options.id).html(tpl.healthy());
		var h = drawHealthy(options);
		$("#"+options.id).html(h);
	}
	/**
	 * 录入者 下拉
	 */
	ui.creatAuthor = function(options){
		$("#"+options.id).html(tpl.creatAuthor());
		var h = drawCreatAuthor(options);
		$("#"+options.id).html(h);
	}
	/**
	 * 节点 下拉
	 */
	ui.taskName = function(options){
		$("#"+options.id).html(tpl.taskName());
		var h = drawTaskName(options);
		$("#"+options.id).html(h);
	}

	return ui;
});